** All options are on the table? Appendix**
** Rotem Dvir **
** December 2020 **

***	Data SetUp	***
cd "~MTurkSample_set"
log using FPA_Appx

clear all
set linesize 80
import delimited "/Dataverse/ChoiceSetData_June2019.csv"

***	Data prep	*********************
/// Download and install the packages tukeyhsd and qsturng to run the code

///	Create dependent variable: total options in choice-set
///	Since each policy is mesaured with a binary indicator, I add all 7 policy options
///	and create a variable for the total number of policies in a respondent's choice-set.
 
gen set_all=p1+p2+p3+p4+p5+p6+p7

/// Create variables for treatments in reduced sample (no control conditions)
gen cas=.
replace cas=0 if casualties==1
replace cas=1 if casualties==2

gen oth=.
replace oth=0 if other==1
replace oth=1 if other==2

********************************
*********	Analyses	********
********************************

*** Appendix B: Internal validity tests
/// Factual Manipulation checks

tab fmc1
tab fmc2

/// Time horizons manipulation check (0=ST; 1=LT)
tab tf_mc if horizon==0
tab tf_mc if horizon==1
anova tf_mc horizon casualties other
tukeyhsd horizon

/// Costs and Importance
anova costs horizon casualties other

sum important, detail
reg important horizon casualties other
margins, at(horizon=(0 1))

*** Appendix C: Choice-set size
/// OLS regression models
/// Models 1&2 below replicate the analysis in the main text,
/// and fit the marginal effects plots in figure 5 in main text.
/// Model 3 replicate the analysis of the reduced sample,
/// results fir with the density plot in figure 4.

/// Model 1: Experimental treatments only 
reg set_all horizon i.casualties other 

/// Model 2: Full model
reg set_all horizon other i.casualties gender age party fp_know edu_cat 

/// Model 3: Reduced sample (also in main text .do file)
/// Create variables for control conditions only (reduced sample analysis)
gen horz=.
replace horz=horizon if casualties==0

/// Create variable for control conditions and choice-set size 
gen horz2=horz if set_all>1

/// Run univariate OLS regression model with reduced sample
/// Compute mean values for both conditions using marginal effects (fit to figure 4 in main text)
/// Model results (table 3, model 3)
reg set_all horz2 gender party age fp_know edu_cat 
margins, at(horz2=(0 1))

*** Appendix C: Choice-set composition
/// Probit interaction models (reduced sample, no control conditions)
/// Results of these models are displayed in appendix file (table 4, models 1&2)
probit p1 i.horizon i.oth i.cas i.horizon##i.oth gender age party fp_know edu_cat
probit p2 i.horizon i.oth i.cas i.horizon##i.oth gender age party fp_know edu_cat

*** Appendix D: Policy selection
/// Multinomial regression models
/// Model replication of main text (table 1) without the set size variable
mlogit pol_select horizon other casualties ///
gender age party fp_know edu_cat, b(1)

*** Appendix E: Contextual preference reversal
/// Cross-tabs of selected policy
/// Including number and percentage of selection
/// Reporting chi-square test for differences
tab seta_2 seta_3, row chi2
tab setb_2 setb_3, row chi2

log close













